bool DeleteUser(UserList head, long id)
{
    UserList lastTemp = (UserList)malloc(sizeof(User));
    UserList temp = (UserList)malloc(sizeof(User));
    if (head->nextUser == NULL || head == NULL)
    {
        status = 0;
        exit(-1);
    }
    else
    {
        temp = head->nextUser;
        if (temp->id == id)
        {
            head->nextUser = temp->nextUser;
            free(temp);
            head->length--;
            return true;
        }
        lastTemp = temp;
        while (temp->nextUser != NULL)
        {
            temp = temp->nextUser;
            if (temp->id == id)
            {
                lastTemp->nextUser = temp->nextUser;
                free(temp);
                head->length--;
                return true;
            }
            lastTemp = temp;
        }
    }
    return false;
}
bool DeleteProject(UserList user, long projectId)
{
    ProjectList lastTemp = (ProjectList)malloc(sizeof(Project));
    ProjectList temp = (ProjectList)malloc(sizeof(Project));
    if (user->nextUser == NULL || user == NULL)
    {
        status = 0;
        exit(-1);
    }
    else
    {
        temp = user->nextProject;
        if (temp->projectId == projectId)
        {
            user->nextProject = temp->nextProject;
            free(temp);
            // head->length--;
            return true;
        }
        lastTemp = temp;
        while (temp->nextProject != NULL)
        {
            temp = temp->nextProject;
            if (temp->projectId == projectId)
            {
                lastTemp->nextProject = temp->nextProject;
                free(temp);
                // head->length--;
                return true;
            }
            lastTemp = temp;
        }
    }
    return false;
}
bool DeleteThesis(UserList user, long thesisId)
{
    ThesisList lastTemp = (ThesisList)malloc(sizeof(Thesis));
    ThesisList temp = (ThesisList)malloc(sizeof(Thesis));
    if (user->nextUser == NULL || user == NULL)
    {
        status = 0;
        exit(-1);
    }
    else
    {
        temp = user->nextThesis;
        if (temp->thesisId == thesisId)
        {
            user->nextThesis = temp->nextThesis;
            free(temp);
            // head->length--;
            return true;
        }
        lastTemp = temp;
        while (temp->nextThesis != NULL)
        {
            temp = temp->nextThesis;
            if (temp->thesisId == thesisId)
            {
                lastTemp->nextThesis = temp->nextThesis;
                free(temp);
                // head->length--;
                return true;
            }
            lastTemp = temp;
        }
    }
    return false;
}
bool DeleteEssay(UserList user, long essayId)